<template>
	<div class="main">
		<div class="block">
	    <span class="demonstration">日期范围限制</span>
	    <el-date-picker
	      v-model="value"
	      type="daterange"
	      placeholder="选择日期范围"
	      :picker-options="pickerOptions">
	    </el-date-picker>
	  </div>
	  <div class="block">
	    <span class="demonstration">vuex实例：</span>
	    <p>Copyright © {{author}} - 2017 All rights reserved</p>
	  </div>
	</div> 
</template>

<script>
  export default {
    data() {
      return {    
        value: '',
        pickerOptions: {
        	disabledDate(time) {
//      		let choiceData = time.getTime() > Date.now() - 8.64e7 && time.getTime() < Date.now() + 3600 * 1000 * 24 * 7;
//          return choiceData;
						return time.getTime() < Date.now() - 8.64e7 || time.getTime() > Date.now() + 3600 * 1000 * 24 * 7;
          }
        }
      };
    },
    computed: {
		  author () {
		  	return this.$store.state.author
		  }
		}
  };
</script>